package org.jeecg.modules.zhima.center.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.zhima.center.entity.OmsOrderItem;
import org.jeecg.modules.zhima.center.mapper.OmsOrderItemMapper;
import org.jeecg.modules.zhima.center.service.IOmsOrderItemService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: oms_order_item
 * @Author: jeecg-boot
 * @Date:   2020-08-27
 * @Version: V1.0
 */

@Service
public class OmsOrderItemServiceImpl extends ServiceImpl<OmsOrderItemMapper, OmsOrderItem> implements IOmsOrderItemService {

    @Override
    public List<OmsOrderItem> listByOrderIds(List<Integer> orderIds) {
        return list(new LambdaQueryWrapper<OmsOrderItem>().in(OmsOrderItem::getOrderId, orderIds));
    }

    @Override
    public List<OmsOrderItem> listByOrderId(Integer orderId) {
        return list(new LambdaQueryWrapper<OmsOrderItem>().eq(OmsOrderItem::getOrderId, orderId));
    }
}
